<div ng-controller="StateEditor">
  <div class="row">
    <div class="col-lg-2 col-md-2 col-sm-2">
    </div>

    <div class="col-lg-10 col-md-10 col-sm-10">
      <div class="oppia-state-editor-header" ng-class="{'oppia-editable-section': editabilityService.isEditable()}">
        <div class="oppia-state-name-container">
          <div ng-if="editabilityService.isEditable()">
            <h4 ng-if="!stateNameEditorIsShown" ng-click="openStateNameEditor()" class="oppia-editable-section">
              <[stateName]>
              <span ng-if="editabilityService.isEditable()" class="glyphicon glyphicon-pencil oppia-editor-edit-icon" title="Edit State Name"></span>
            </h4>

            <div ng-if="stateNameEditorIsShown">
              <form class="form-horizontal" role="form" ng-submit="saveStateNameAndRefresh($parent.$parent.tmpStateName)">
                <input type="text" ng-model="$parent.$parent.tmpStateName" focus-on="stateNameEditorOpened">
                <button type="submit" class="btn btn-default btn-sm">Done</button>
              </form>
            </div>
          </div>

          <div ng-if="!editabilityService.isEditable()">
            <h4><[stateName]></h4>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="oppia-state-editor-body">
    <div class="oppia-editor" ng-show="!!stateName">
      {% include 'editor/state_editor_parameters.html' %}
      <div>
        {% include 'editor/state_editor_content.html' %}
      </div>
      <div ng-controller="StateInteraction">
        {% include 'editor/state_editor_interaction.html' %}
        <div>
          {% include 'editor/state_editor_rules.html' %}
        </div>
      </div>
      <div style="height: 100px;"></div>
    </div>
  </div>
</div>
